package com.blb.thread.homework;

public class Homework5 {

    public static void main(String[] args) throws InterruptedException {
        new Thread(() -> {
            while(true){
                System.out.println("0");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();
        Thread.sleep(100);
        new Thread(() -> {
            while(true){
                System.out.println("1");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();
    }
}
